import java.util.Arrays;

public class Main {
    public static  void printArray( String[] array){
        for (int i=0;i<array.length;i++){
            System.out.println(array[i]);
        }
    }
    public static String[] reverse(String[] list) {
        String[] result = new String[list.length];

        for (int i = 0, j = result.length - 1; i < list.length; i++, j--) {
            result[j] = list[i];
        }
        return result;
    }
//Array Traverse
    public static void main(String[] args) {
        int [] a={1,2,3,34,43,5,35,23,52};
        Arrays.sort(a);//sort方法确实给我实现了数组升序的排序处理 ！
        for (int x: a){
            System.out.print(x+" ");
            if (x== a[a.length-1])System.out.println();//仅使用于数组内不相同的元素 False Just Print a \n
        }

        Arrays.fill(a,10);//fill 填充是吧 直接把数组元素的值全部覆盖掉了 !
        for (int x: a){
            System.out.print(x+" ");
            if (x== a[a.length-1])System.out.println();
        }



/*        str[0] = new String[2];
        str[1] = new String[3];
        str[0][0] = new String("Good");
        str[0][1] = new String("Luck");
        str[1][0] = new String("to");
        str[1][1] = new String("you");
        str[1][2] = new String("!");
       for (int i=0;i<2;i++){
           for (int j=0;j<2;j++){
                System.out.println(str[i][j]);
           }
       }

     System.out.println(str);*/

//        String [] array={"JackYangHello"};
//        Main.printArray(array);
//        System.out.println(Main.reverse(array));
//        Main.printArray(Main.reverse(array));


//        System.out.println("Hello world!");
    }
}